package cn.wolfcode.entity;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * 
 * </p>
 *
 * @author c1eye
 * @since 2022-11-03
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Region implements Serializable {

    private static final long serialVersionUID=1L;

      @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String name;

    private String sn;

    private Integer ishot;

    private Integer seq;

    private String info;

    private String refIds;

    public String getJsonString(){
        Map<String, Object> map = new HashMap<>();
        map.put("id", id);
        map.put("name", name);
        map.put("sn", sn);
        map.put("ishot", ishot);
        map.put("seq", seq);
        map.put("info", info);
        map.put("refIds", refIds);
        String ret = JSON.toJSONString(map);
        return ret;
    }
}
